const fs =require('fs')
const userString = fs.readFileSync('./db/users.json').toString()
const usersArray=JSON.parse(userString)
console.log(userString);

const user3= {id:3,name:'tom',password:"xxx"}
usersArray.push(user3)
const string =JSON.stringify(usersArray)
fs.writeFileSync('./db/users.json',string)
